﻿CREATE TABLE [CO].[DocTypes] (
    [Id]        INT           NOT NULL,
    [Name]      VARCHAR (100) NOT NULL,
    [ShortName] VARCHAR (20)  NOT NULL,
    [Note]      VARCHAR (250) NULL,
    [MD]        DATETIME      CONSTRAINT [DF__DocTypes__MD__20E1DCB5] DEFAULT (getdate()) NOT NULL,
    [MW]        VARCHAR (50)  CONSTRAINT [DF__DocTypes__MW__21D600EE] DEFAULT (suser_sname()) NOT NULL,
    CONSTRAINT [PK_DocTypes] PRIMARY KEY CLUSTERED ([Id] ASC)
);


GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_DocTypes_Name]
    ON [CO].[DocTypes]([Name] ASC);


GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_DocTypes_ShortName]
    ON [CO].[DocTypes]([ShortName] ASC);

